﻿<UserControl 
    x:Class="DiscoveryLogic.Analytics.Modules.VisualSettings.EdgeVisualSetting"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="Auto" Width="Auto" MinHeight="300" Background="Transparent"
    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
    Loaded="UserControl_Loaded">
    <Border CornerRadius="10" BorderBrush="Gray" BorderThickness="2" Background="Gainsboro">
        <Grid Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="50"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            
            <Label
                Grid.Row="0" Grid.Column="0"
                VerticalAlignment="Center"
                Margin="5,0,0,0">Entity from:</Label>
            <ComboBox x:Name="cboEntityFrom"
                Grid.Row="0" Grid.Column="1"
                VerticalAlignment="Center"
                Margin="5,0,10,0" MinWidth="150" SelectionChanged="cboEntityFrom_SelectionChanged" />
            
            <Label
                Grid.Row="1" Grid.Column="0"
                VerticalAlignment="Center"
                Margin="5,0,0,0">Entity to:</Label>
            <ComboBox x:Name="cboEntityTo"
                Grid.Row="1" Grid.Column="1"
                VerticalAlignment="Center"
                Margin="5,0,10,0" MinWidth="150" SelectionChanged="cboEntityTo_SelectionChanged" />
            
            <Label
                Grid.Row="2" Grid.Column="0"
                VerticalAlignment="Center"
                Margin="5,0,0,0">Line style:</Label>
            <ComboBox x:Name="cboLineStyle"
                Grid.Row="2" Grid.Column="1"
                VerticalAlignment="Center"
                Margin="5,0,10,0" MinWidth="150" SelectionChanged="cboLineStyle_SelectionChanged" />
            
            <Label
                Grid.Row="3" Grid.Column="0"
                VerticalAlignment="Center"
                Margin="5,0,0,0">Color:</Label>
            <StackPanel
                Grid.Row="3" Grid.Column="1"
                VerticalAlignment="Center"
                Margin="5,0,10,0" Orientation="Horizontal">
                <Canvas Width="100" Height="20" x:Name="canvasEdge" />
                <Button x:Name="btnColor" Margin="5,0,5,0" Content=".." Width="20" Height="20" Click="btnColor_Click" /> 
            </StackPanel>
            
            <Label
                Grid.Row="4" Grid.Column="0"
                VerticalAlignment="Center"
                Margin="5,0,0,0">Thickness:</Label>
            <StackPanel
                Grid.Row="4" Grid.Column="1"
                VerticalAlignment="Center"
                Margin="5,0,10,0" Orientation="Horizontal">
                <RadioButton 
                    x:Name="rdFixed" VerticalAlignment="Center" Content="Fixed" IsChecked="True" 
                    Click="rdFixed_Click" />
                <Slider 
                    x:Name="sliderThickness" Orientation="Horizontal" VerticalAlignment="Center"
                    SmallChange="0.1" LargeChange="0.5"     
                    Height="20" Width="100" Value="2" 
                    Minimum="0" ValueChanged="sliderThickness_ValueChanged" />
                <Label 
                    x:Name="lblThickness" Margin="5,0,5,0">2</Label>
            </StackPanel>
            
            <StackPanel
                Grid.Row="5" Grid.Column="1"
                VerticalAlignment="Center"
                Margin="5,0,10,0" Orientation="Horizontal">
                <RadioButton 
                    x:Name="rdDynamic" VerticalAlignment="Center" 
                    Content="Dynamic" IsChecked="False" 
                    Click="rdDynamic_Click" />
                <ComboBox 
                    x:Name="cboEdgeThickMeasure" VerticalAlignment="Center" 
                    Margin="5,0,0,0" MinWidth="150" SelectionChanged="cboEdgeThickMeasure_SelectionChanged" />
            </StackPanel>
            
            <Label
                Grid.Row="6" Grid.Column="0"
                VerticalAlignment="Center" Margin="5,0,0,0">
                Show distance:
            </Label>
            <CheckBox
                Grid.Row="6" Grid.Column="1" VerticalAlignment="Center"
                Margin="5,0,0,0" x:Name="ckShowDistance" IsChecked="False" 
                Click="ckShowDistance_Click"></CheckBox>
            
            <Label
                Grid.Row="7" Grid.Column="0"
                VerticalAlignment="Center" Margin="5,0,0,0">
                Distance scale:
            </Label>
            <StackPanel
                Grid.Row="7" Grid.Column="1"
                Orientation="Horizontal" VerticalAlignment="Center"
                Margin="5,0,5,0">
                <Label 
                    x:Name="lblDistanceScale">2.5</Label>
                <Slider 
                    x:Name="sliderDistanceScale" Width="100" Height="20"
                    SmallChange="0.1" LargeChange="0.5" Minimum="1.0" Maximum="20.0"
                    Value="2.5" ValueChanged="sliderDistanceScale_ValueChanged" />
            </StackPanel>
            
            <StackPanel
                Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="2"
                VerticalAlignment="Center" Orientation="Horizontal"
                HorizontalAlignment="Right" Margin="0,0,10,0">
                <Button x:Name="btnCancel" Content="Cancel" Width="60" Margin="0,0,5,0" Click="btnCancel_Click" />
                <Button x:Name="btnApply" Content="Apply" Width="60" Margin="5,0,0,0" Click="btnApply_Click" />
            </StackPanel>
        </Grid>
    </Border>
</UserControl>
